package com.sxt.quartz.jobs;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.sxt.quartz.service.UserService;

public class QuartzJob2 extends QuartzJobBean {
	
	@Autowired
	private UserService userService;

	@Override
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
	//  这里写调用执行定时调度任务的逻辑
        System.out.println("------天青色等烟雨-------" + new Date());
        
        this.userService.addUser();
	}

}
